marked.use(markedGfmHeadingId.gfmHeadingId({prefix: "h-"}), {
    hooks: {
        postprocess(html) {
            let headings = markedGfmHeadingId.getHeadingList();
            let items = headings.map(({id,raw,level})=>`<li><a href="#${id}" class="toc-level-${level}">${raw}</a></li>`);
            return `<div class="markdown-toc"><ul class="markdown-toc-list">${items.join('')}</ul></div>${html}`;
        }
    }
});